﻿using System;
using System.Collections.Generic;

using System.Text;

namespace DTO
{
    public class CreditCard : BaseDTO
    {        
        public string CardHolder { get; set; }
        public string Number { get; set; }
        public int ExpMonth { get; set; }
        public int ExpYear { get; set; }
        public CardType Type { get; set; }

        public override string ToString ()
        {
            string result = this.CardHolder + "<br />";
            result += this.Type.Name + " - " + this.Number + "<br />";
            result += "Expires on " + this.ExpMonth.ToString() + "/" + this.ExpYear.ToString() + "<br />";
            return result;
        }
    }

    public class CardType : BaseDTO
    {
        #region Properties

        public string Name { get; set; }

        #endregion

        #region Constructors
        public CardType () : this(0) { }
        public CardType(int id)
            : base(id)
        {
        }        
        #endregion
    }

    public class AccountType : BaseDTO
    {
        #region Properties

        public string Name { get; set; }

        #endregion

        #region Constructors
        public AccountType () : this(0) { }
        public AccountType(int id)
            : base(id)
        {
        }        
        #endregion
    }

    public class AccountCategory : BaseDTO
    {
        #region Properties

        public string Name { get; set; }

        #endregion
        #region Constructors
        public AccountCategory () : this(0) { }
        public AccountCategory(int id)
            : base(id)
        {
        }        
        #endregion
    }

    public class BankAccount : BaseDTO
    {
        public AccountCategory AccountCategory { get; set; }
        public AccountType AccountType { get; set; }
        public string RountingNumber { get; set; }
        public string AccountNumber { get; set; }

        public override string ToString()
        {
            string result = this.RountingNumber;
            result += " - " + this.AccountNumber + "<br />";
            result += this.AccountType.Name + " - " + this.AccountCategory.Name;
            return result;
        }
    }
}
